package com.atguigu07._abstract.ex2;

public class HourlyEmployee extends Employee{
    private int wage;
    private int hour;

    public HourlyEmployee(String name, int number, MyDate date, int wage, int hour) {
        super(name, number, date);
        this.wage = wage;
        this.hour = hour;
    }



    public int getWage() {
        return wage;
    }

    public void setWage(int wage) {
        this.wage = wage;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    @Override
    public int earning(int mon) {
        return wage*hour;
    }

    @Override
    public String toString() {
        return "name"+getName()+"number"+getNumber()+"birthday"+getDate().printBirth();
    }
}
